//
//  NightModel.m
//  Blank
//
//  Created by whg－54 on 15/10/6.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "NightModel.h"
#import "AppDelegate.h"
@implementation NightModel
//夜间/白天模式转换
+(void) changeNightModel:(BOOL)nightChange
{
    AppDelegate *delegate = [[UIApplication sharedApplication]delegate];
    /**
     *  根据参数改变夜间模式判断参数
     */
    if (nightChange == 1) {
        delegate.nightModel = 1;
        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        [defaults setBool:delegate.nightModel forKey:@"nightModel"];
    }
    else{
        delegate.nightModel = 0;
        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        [defaults setBool:delegate.nightModel forKey:@"nightModel"];
    }
}

//判断显示模式
+(BOOL) getColorModel
{
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    return [defaults boolForKey:@"nightModel"];
}

//改变抽屉跳转页
+(NSInteger) changeAppPageCount:(NSInteger)pageCount
{
    AppDelegate *delegate = [[UIApplication sharedApplication]delegate];
    delegate.pageCount = pageCount;
    return delegate.pageCount;
}

@end
